package com.fis.hlo.pm.persistence;

import java.math.BigDecimal;
import java.util.Date;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.datatype.XMLGregorianCalendar;






























/**
 * <p>
 * Java class for customInvoices complex type.
 * 
 * <p>
 * The following schema fragment specifies the expected content contained within
 * this class.
 * 
 * <pre>
 * &lt;complexType name="customInvoices">
 *   &lt;complexContent>
 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       &lt;sequence>
 *         &lt;element name="account" type="{http://invoices.pm.hlo.fis.com/}accounts" minOccurs="0"/>
 *         &lt;element name="accountType" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         &lt;element name="discount" type="{http://www.w3.org/2001/XMLSchema}decimal" minOccurs="0"/>
 *         &lt;element name="fromDate" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/>
 *         &lt;element name="fromPartner" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         &lt;element name="invoiceId" type="{http://www.w3.org/2001/XMLSchema}long"/>
 *         &lt;element name="invoiceNo" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         &lt;element name="invoiceType" type="{http://invoices.pm.hlo.fis.com/}invoiceType" minOccurs="0"/>
 *         &lt;element name="month" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/>
 *         &lt;element name="object" type="{http://invoices.pm.hlo.fis.com/}objects" minOccurs="0"/>
 *         &lt;element name="org" type="{http://www.w3.org/2001/XMLSchema}decimal" minOccurs="0"/>
 *         &lt;element name="payAmount" type="{http://www.w3.org/2001/XMLSchema}decimal" minOccurs="0"/>
 *         &lt;element name="promotion" type="{http://www.w3.org/2001/XMLSchema}decimal" minOccurs="0"/>
 *         &lt;element name="remain" type="{http://www.w3.org/2001/XMLSchema}decimal" minOccurs="0"/>
 *         &lt;element name="selected" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
 *         &lt;element name="status" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         &lt;element name="taxAmount" type="{http://www.w3.org/2001/XMLSchema}decimal" minOccurs="0"/>
 *         &lt;element name="toDate" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/>
 *         &lt;element name="toPartner" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         &lt;element name="trans" type="{http://www.w3.org/2001/XMLSchema}decimal" minOccurs="0"/>
 *       &lt;/sequence>
 *     &lt;/restriction>
 *   &lt;/complexContent>
 * &lt;/complexType>
 * </pre>
 * 
 * 
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "customInvoices", propOrder = { "account", "accountType",
		"discount", "fromDate", "fromPartner", "invoiceId", "invoiceNo",
		"invoiceType", "month", "object", "org", "payAmount", "promotion",
		"remain", "selected", "status", "taxAmount", "toDate", "toPartner",
		"trans" })
public class CustomInvoices {

	protected Accounts account;
	protected String accountType;
	protected BigDecimal discount;
	@XmlSchemaType(name = "dateTime")
	protected Date fromDate;
	protected String fromPartner;
	protected long invoiceId;
	protected String invoiceNo;
	protected InvoiceType invoiceType;
	@XmlSchemaType(name = "dateTime")
	protected Date month;
	protected Objects object;
	protected BigDecimal org;
	protected BigDecimal payAmount;
	protected BigDecimal promotion;
	protected BigDecimal remain;
	protected boolean selected;
	protected String status;
	protected BigDecimal taxAmount;
	@XmlSchemaType(name = "dateTime")
	protected Date toDate;
	protected String toPartner;
	protected BigDecimal trans;

	public CustomInvoices() {
	}

	public CustomInvoices(Accounts account, BigDecimal discount, Date fromDate,
			Long invoiceId, String invoiceNo, InvoiceType invoiceType,
			Date month, Objects object, BigDecimal org, BigDecimal promotion,
			BigDecimal remain, String status, BigDecimal taxAmount,
			Date toDate, BigDecimal trans, boolean selected) {

		this.discount = discount;
		this.fromDate = fromDate;
		this.invoiceId = invoiceId;
		this.invoiceType = invoiceType;
		this.month = month;
		this.org = org;
		this.promotion = promotion;
		this.remain = remain;
		this.status = status;
		this.taxAmount = taxAmount;
		this.toDate = toDate;
		this.trans = trans;
		this.selected = selected;
		this.account = account;
		this.invoiceNo = invoiceNo;
		this.object = object;

		if (account != null && account.getAccType() != null)
			this.accountType = account.getAccType().getName();

		if (account != null && account.getTypeId() == 2) {
			fromPartner = "Hello";
			toPartner = account.getObjects().getName();
		}
		else
		{
			toPartner = "Hello";
			fromPartner = account.getObjects().getName();
		}

	}

	/**
	 * Gets the value of the account property.
	 * 
	 * @return possible object is {@link Accounts }
	 * 
	 */
	public Accounts getAccount() {
		return account;
	}

	/**
	 * Sets the value of the account property.
	 * 
	 * @param value
	 *            allowed object is {@link Accounts }
	 * 
	 */
	public void setAccount(Accounts value) {
		this.account = value;
	}

	/**
	 * Gets the value of the accountType property.
	 * 
	 * @return possible object is {@link String }
	 * 
	 */
	public String getAccountType() {
		return accountType;
	}

	/**
	 * Sets the value of the accountType property.
	 * 
	 * @param value
	 *            allowed object is {@link String }
	 * 
	 */
	public void setAccountType(String value) {
		this.accountType = value;
	}

	/**
	 * Gets the value of the discount property.
	 * 
	 * @return possible object is {@link BigDecimal }
	 * 
	 */
	public BigDecimal getDiscount() {
		return discount;
	}

	/**
	 * Sets the value of the discount property.
	 * 
	 * @param value
	 *            allowed object is {@link BigDecimal }
	 * 
	 */
	public void setDiscount(BigDecimal value) {
		this.discount = value;
	}

	/**
	 * Gets the value of the fromDate property.
	 * 
	 * @return possible object is {@link XMLGregorianCalendar }
	 * 
	 */
	public Date getFromDate() {
		return fromDate;
	}

	/**
	 * Sets the value of the fromDate property.
	 * 
	 * @param value
	 *            allowed object is {@link XMLGregorianCalendar }
	 * 
	 */
	public void setFromDate(Date value) {
		this.fromDate = value;
	}

	/**
	 * Gets the value of the fromPartner property.
	 * 
	 * @return possible object is {@link String }
	 * 
	 */
	public String getFromPartner() {
		return fromPartner;
	}

	/**
	 * Sets the value of the fromPartner property.
	 * 
	 * @param value
	 *            allowed object is {@link String }
	 * 
	 */
	public void setFromPartner(String value) {
		this.fromPartner = value;
	}

	/**
	 * Gets the value of the invoiceId property.
	 * 
	 */
	public long getInvoiceId() {
		return invoiceId;
	}

	/**
	 * Sets the value of the invoiceId property.
	 * 
	 */
	public void setInvoiceId(long value) {
		this.invoiceId = value;
	}

	/**
	 * Gets the value of the invoiceNo property.
	 * 
	 * @return possible object is {@link String }
	 * 
	 */
	public String getInvoiceNo() {
		return invoiceNo;
	}

	/**
	 * Sets the value of the invoiceNo property.
	 * 
	 * @param value
	 *            allowed object is {@link String }
	 * 
	 */
	public void setInvoiceNo(String value) {
		this.invoiceNo = value;
	}

	/**
	 * Gets the value of the invoiceType property.
	 * 
	 * @return possible object is {@link InvoiceType }
	 * 
	 */
	public InvoiceType getInvoiceType() {
		return invoiceType;
	}

	/**
	 * Sets the value of the invoiceType property.
	 * 
	 * @param value
	 *            allowed object is {@link InvoiceType }
	 * 
	 */
	public void setInvoiceType(InvoiceType value) {
		this.invoiceType = value;
	}

	/**
	 * Gets the value of the month property.
	 * 
	 * @return possible object is {@link XMLGregorianCalendar }
	 * 
	 */
	public Date getMonth() {
		return month;
	}

	/**
	 * Sets the value of the month property.
	 * 
	 * @param value
	 *            allowed object is {@link XMLGregorianCalendar }
	 * 
	 */
	public void setMonth(Date value) {
		this.month = value;
	}

	/**
	 * Gets the value of the object property.
	 * 
	 * @return possible object is {@link Objects }
	 * 
	 */
	public Objects getObject() {
		return object;
	}

	/**
	 * Sets the value of the object property.
	 * 
	 * @param value
	 *            allowed object is {@link Objects }
	 * 
	 */
	public void setObject(Objects value) {
		this.object = value;
	}

	/**
	 * Gets the value of the org property.
	 * 
	 * @return possible object is {@link BigDecimal }
	 * 
	 */
	public BigDecimal getOrg() {
		return org;
	}

	/**
	 * Sets the value of the org property.
	 * 
	 * @param value
	 *            allowed object is {@link BigDecimal }
	 * 
	 */
	public void setOrg(BigDecimal value) {
		this.org = value;
	}

	/**
	 * Gets the value of the payAmount property.
	 * 
	 * @return possible object is {@link BigDecimal }
	 * 
	 */
	public BigDecimal getPayAmount() {
		return payAmount;
	}

	/**
	 * Sets the value of the payAmount property.
	 * 
	 * @param value
	 *            allowed object is {@link BigDecimal }
	 * 
	 */
	public void setPayAmount(BigDecimal value) {
		this.payAmount = value;
	}

	/**
	 * Gets the value of the promotion property.
	 * 
	 * @return possible object is {@link BigDecimal }
	 * 
	 */
	public BigDecimal getPromotion() {
		return promotion;
	}

	/**
	 * Sets the value of the promotion property.
	 * 
	 * @param value
	 *            allowed object is {@link BigDecimal }
	 * 
	 */
	public void setPromotion(BigDecimal value) {
		this.promotion = value;
	}

	/**
	 * Gets the value of the remain property.
	 * 
	 * @return possible object is {@link BigDecimal }
	 * 
	 */
	public BigDecimal getRemain() {
		return remain;
	}

	/**
	 * Sets the value of the remain property.
	 * 
	 * @param value
	 *            allowed object is {@link BigDecimal }
	 * 
	 */
	public void setRemain(BigDecimal value) {
		this.remain = value;
	}

	/**
	 * Gets the value of the selected property.
	 * 
	 */
	public boolean isSelected() {
		return selected;
	}

	/**
	 * Sets the value of the selected property.
	 * 
	 */
	public void setSelected(boolean value) {
		this.selected = value;
	}

	/**
	 * Gets the value of the status property.
	 * 
	 * @return possible object is {@link String }
	 * 
	 */
	public String getStatus() {
		return status;
	}

	/**
	 * Sets the value of the status property.
	 * 
	 * @param value
	 *            allowed object is {@link String }
	 * 
	 */
	public void setStatus(String value) {
		this.status = value;
	}

	/**
	 * Gets the value of the taxAmount property.
	 * 
	 * @return possible object is {@link BigDecimal }
	 * 
	 */
	public BigDecimal getTaxAmount() {
		return taxAmount;
	}

	/**
	 * Sets the value of the taxAmount property.
	 * 
	 * @param value
	 *            allowed object is {@link BigDecimal }
	 * 
	 */
	public void setTaxAmount(BigDecimal value) {
		this.taxAmount = value;
	}

	/**
	 * Gets the value of the toDate property.
	 * 
	 * @return possible object is {@link XMLGregorianCalendar }
	 * 
	 */
	public Date getToDate() {
		return toDate;
	}

	/**
	 * Sets the value of the toDate property.
	 * 
	 * @param value
	 *            allowed object is {@link XMLGregorianCalendar }
	 * 
	 */
	public void setToDate(Date value) {
		this.toDate = value;
	}

	/**
	 * Gets the value of the toPartner property.
	 * 
	 * @return possible object is {@link String }
	 * 
	 */
	public String getToPartner() {
		return toPartner;
	}

	/**
	 * Sets the value of the toPartner property.
	 * 
	 * @param value
	 *            allowed object is {@link String }
	 * 
	 */
	public void setToPartner(String value) {
		this.toPartner = value;
	}

	/**
	 * Gets the value of the trans property.
	 * 
	 * @return possible object is {@link BigDecimal }
	 * 
	 */
	public BigDecimal getTrans() {
		return trans;
	}

	/**
	 * Sets the value of the trans property.
	 * 
	 * @param value
	 *            allowed object is {@link BigDecimal }
	 * 
	 */
	public void setTrans(BigDecimal value) {
		this.trans = value;
	}

}
